package com.yj.common.enums;

import com.google.gson.annotations.SerializedName;

/**
 * Copyright 2017 (C) Yunjian-VC
 * Created on : 2017/12/21
 * Author     : Unbelievable9
 **/
public enum OAUserLevel {

    /**
     * 1 业务员
     * 2 领导
     * 3 总经办领导
     */

    @SerializedName("1")
    SALESMAN(1),

    @SerializedName("2")
    LEADER(2),

    @SerializedName("3")
    AUTHORITY(3);


    public final Integer value;

    private OAUserLevel(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static OAUserRoleLevel fromValue(Integer value) {
        for (OAUserRoleLevel oaUserRoleLevel : OAUserRoleLevel.values()) {
            if (oaUserRoleLevel.getValue().equals(value)) {
                return oaUserRoleLevel;
            }
        }

        return null;
    }
}
